package com.skt.exception;

public class CartException extends BaseException {

    public CartException(ErrorCode errorCode) {
        super(errorCode);
    }

    public CartException(int code, String message) {
        super(code, message);
    }

    public CartException(ErrorCode errorCode, String customMessage) {
        super(errorCode, customMessage);
    }


    // ========== 通用创建方法 ==========
    public static CartException of(ErrorCode errorCode) {
        return new CartException(errorCode);
    }

    public static CartException of(ErrorCode errorCode, String customMessage) {
        return new CartException(errorCode, customMessage);
    }

    public static CartException of(int code, String message) {
        return new CartException(code, message);
    }
}